package com.team.RunsFast_Api.service.impl;

import com.team.RunsFast_Api.dao.OrderPayDao;
import com.team.RunsFast_Api.dto.PayDto;
import com.team.RunsFast_Api.service.intf.OrderPayService;
import com.team.runsfast.entity.OrderPay;
import com.team.runsfast.vo.R;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import javax.annotation.Resource;

/**
 * @author fxy
 * @date 2022/9/26
 */
@Service
public class OrderPayServiceImpl implements OrderPayService {

    @Resource
    private OrderPayDao dao;

    @Override
    public int save(PayDto dto) {
        if(dto!=null){
            OrderPay pay = new OrderPay(dto.getNo(),dto.getTitle(),dto.getMoney(),dto.getType());
//            return dao.insert(pay);
        }
        return 0;
    }

    @Override
    public int updateStatus(String no, String status) {
        if(StringUtils.hasLength(no)){
//            return dao.updateStatus(status,no);
        }
        return 0;
    }

    @Override
    public R all() {
//        return R.ok(dao.selectList(null));
        return R.ok(null);
    }
}
